<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1, user-scalable=no">
    <title>首页</title>
    <link rel="stylesheet" th:href="@{/css/index.css}">
    <link rel="stylesheet" th:href="@{/css/hcc.css}">
    <link rel="stylesheet" th:href="@{/css/style.css}">
</head>
<body>
<h2 style="text-align: center;line-height: 60px;color: #3d3d3d">首页</h2>
<div class="tab">
    <ul class="ul-container">
        <li>
            <div class="tab-box">
                <a  id="mous" style="width: 50px;">
                    <img src="/img/1.png">
                    我的收益
                </a>
            </div>
            <div class="tab-box" style="margin-left: 28%">
                <a href="#" id="addstores" style="width: 50px;">
                    <img src="/img/2.png">
                    新增商户
                </a>
            </div>

        </li>



    </ul>
    <div class="dot-container">

    </div>

</div>
<div>

    <br>
    <div class="list_1">




    </div>
</div>
<div  id="tuichu" style="width: 60%;margin: auto;background-color: #ff5053;color: whitesmoke; height: 50px; line-height: 50px;margin-top: 60%;">退出</div>
</body>
<script th:src="@{/js/jquery-1.8.2.min.js}"></script>
<script th:src="@{/js/toast_367A9.js}"></script>
<script type="text/javascript" th:src="@{/js/main.js}"></script>
<script type="text/javascript">
    // 弹性滑动
    // NavTouch('.tab',{elastic:true,speed:'0.3s',timing:'linear'});
    NavTouch('.tab');
  var data  =localStorage.getItem("loginuser");
    var loginUser = JSON.parse(data);
    if (loginUser==null){
        window.location.href="/user/login";
    }


    $(function(){
   /*    var data  =localStorage.getItem("loginuser");
       var  loginUser = JSON.parse(data);
       console.log(" -- -",loginUser.id);

        var json={id:loginUser.id}
        $.ajax({
            url : "/store/getstore",
            type: 'GET',
            dataType:'json',
            contentType:"application/json",
            data: {id:loginUser.id},
            dataType:"text",

            success : function(data) {

                var dats=JSON.parse(data);

                if (dats.status==200){

                   var store=dats.data;
                   //console.log(store);
                   var num=store.length;
                    var str="";
                    for(var i=0;i<num;i++){

                       console.log(store[i].name);
                        str+="<tr><td>" + store[i].id +"</td><td>"
                            + store[i].name + "</td><td>"
                            + store[i].seat +"</td><td>" + store[i].picture +"</td><td>"+store[i].createTime+"</td></tr>";
                        $("#atable tbody").html(str);
                    }


                } else{

                    ToastShow(dats.msg);
                }
            },
            error : function(req, err, ex) {
                $("#txtRep").val(req.responseText + "\r\n" + err + "\r\n" + ex);
            }
        });*/

        $("#addstores").click(function () {
            window.location.href="/user/doAdd";

        });
    $("#mous").click(function () {
            window.location.href="/user/show";

        });

    $("#tuichu").click(function () {
        localStorage.removeItem('loginuser');
        window.location.href="/user/login";
    })





    })



</script>
</html>